home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-10-15 | 1.2 KB | 56 lines | [TEXT/MSWD] |
- %! PS-Adobe-2.0
- serverdict begin 0 exitserver
- %%Title; Font reencoding
- %%EndComments
- %this file defines a Postscript procedure called "R"
- %which will reencode a font. It expects to find three
- %things on the operand stack:
-
- % [array] /NewName /OldName
-
- %The array should contain pairs of <number><name>,
- %like "32 space", each of which will define a slot in
- %the encoding and the name to put in that slot. Only
- %those names which are needed to override the
- %existing ones need be specified followed by more
- %than one name, like "128/name1 /name2". In this
- %case, the names will be sequentially stored in the
- %encoding starting at the initial number (in this case
- %128).
-
-
- /R{
- findfont begin currentdict dup length dict begin
- { 1 index /FID ne {def} {pop pop} ifelse
- } forall
-
- /FontName exch def dup length 0 ne
-
- { /Encoding Encoding 256 array copy def
- 0 exch
-
- { dup type /nametype eq
-
- { Encoding 2 index 2 index put
- pop 1 add
- }
- { exch pop
- } ifelse
- } forall
- } if pop
-
- currentdict dup end end
- /FontName get exch definefont pop
- } bind def
-
- %%EndProlog
-
- %%BeginSetup
- %%BeginEncoding: Symbol Symbol
-
- [8#360/apple] /Symbol /Symbol R
-
- %%EndEncoding
- %%EndSetup
-
-